#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h> 
#include <stdlib.h> 
#include <string.h> 
#include <math.h> 
#include <ctype.h> 
#include <time.h> 
#include <assert.h>

int main()
{
	int n, m;
	int count = 0;
	scanf("%d%d", &n,&m);
	for (int i = 0; i < 32; i++)
	{
		int a = (n >> i) & 1;
		int b = (m >> i) & 1;
		if (a != b)
			count++;
	}
	printf("%d\n", count);


	return 0;
}